using System;
using System.Web.UI;

namespace facebook.web
{
	public class CanvasIFrameMasterPage : MasterPage
	{
		private readonly API api = new API();
	    private bool _autoAdd = true;
		private string _secret;
		private bool _useSession = true;

		public bool UseSession
		{
			get { return _useSession; }
			set { _useSession = value; }
		}

		public bool AutoAdd
		{
			get { return _autoAdd; }
			set { _autoAdd = value; }
		}

		public API API
		{
			get
			{
			    return api;
			}
		}

		protected override void OnPreRender(EventArgs e)
		{
			Response.AppendHeader("P3P", "CP=\"CAO PSA OUR\"");
			base.OnPreRender(e);
		}

		protected void Page_Init(object sender, EventArgs e)
		{
			BasePageHelper.LoadIFramePage(api, _useSession, _autoAdd, Request, Response, Session);
		}
	}
}